<template>
  <div class="logbody popAdd scroll">
    <el-form label-position="left" class="formdata" ref="form" :model="form" label-width="140px">
      <el-form-item class="w50" label="编号">
        <el-input class="w100m" v-model="form.id"></el-input>
      </el-form-item>
      <el-form-item class="w50" label="机构名称">
        <el-input class="w100m" v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item class="w50" label="上级机构">
        <el-select class="w100m" v-model="form.department" placeholder="请选择">
          <el-option label="部门1" value="bumen1"></el-option>
          <el-option label="部门2" value="bumen2"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item class="w50" label="地址">
        <el-input class="w100m" v-model="form.address"></el-input>
      </el-form-item>
      <el-form-item class="w50" label="电话">
        <el-input class="w100m" v-model="form.contact"></el-input>
      </el-form-item>
      <el-form-item class="w50" label="备注">
        <el-input class="w100m" v-model="form.remark"></el-input>
      </el-form-item>
    </el-form>
    <div class="tijiao">
      <div class="searchBut" @click="submit">
        <span>提交</span>
      </div>
      <div class="searchBut" @click="cancel">
        <span>取消</span>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  data() {
    return {
      form: {
        id: '',
        name: '',
        department: '',
        address: '',
        contact: '',
        remark: ''
      }
    }
  },
  components: {},
  mounted() {
  },
  methods: {
    submit() {
      this.$message({
        message: '保存成功',
        type: 'success'
      });
      this.$emit('saveData', 0)
    },
    cancel() {
      this.$emit('saveData', 0)
    },
  },
}
</script>

<style lang="scss" scoped>
.home {
  width: 100%;
  position: fixed;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: nowrap;
  flex-direction: column;
}

.homeMain {
  position: relative;
  width: calc(100% - 60px);
  height: calc(100% - 160px);
  margin-top: 140px;
  display: flex;
  margin-left: 30px;
  z-index: 1;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;

  .pageInner {
    width: 100%;
    position: relative;
    height: 100%;

    .set {
      font-size: 28px;
      cursor: pointer;
      color: #1ebffd;
    }

    .breadcrumb {
      width: calc(100% - 40px);
      margin-left: 20px;
      position: relative;
      height: 40px;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-wrap: nowrap;
      flex-direction: row;
      align-content: flex-start;
    }

    .pageInnerData {
      position: relative;
      width: calc(100% - 40px);
      margin: 10px auto;
      height: calc(100% - 170px);
    }

  }
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;
  height: 50px;
}

.detail {
  width: 100%;
  height: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;

  img {
    width: 60px;
    height: 60px;
  }
}

.popAdd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
  align-content: flex-start;
  margin-left: 20px;
  margin-right: 20px;

  .searchl {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    color: #82b3db;
    font-size: 14px;

    .searchls {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-wrap: nowrap;
      flex-direction: row;
      align-content: flex-start;
    }

    .label {
      margin-right: 10px;
      margin-left: 10px;
      font-size: 14px;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .label2 {
      margin-right: 10px;
    }
  }

  .searchr {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
  }
}

.searchBut {
  background: url("../assets/butbg.png");
  width: 125px;
  height: 42px;
  margin-left: 10px;
  flex-shrink: 0;
  cursor: pointer;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;

  span {
    font-size: 14px;
  }
}

.logbody {
  width: calc(100% - 60px);
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: column;
  align-content: flex-start;

  .formdata {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    flex-direction: row;
    align-content: flex-start;
    margin-top: 20px;

    .w50 {
      width: calc(100% - 20px);
      margin-left: 10px;
      margin-right: 10px;
    }

    :deep(.el-form-item__label) {
      color: #82b3db;
      font-size: 14px;
    }
  }
}

.tijiao {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  margin-top: 30px;
  align-content: flex-start;
}
</style>
